<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('商户换机')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-risk_black" enctype="multipart/form-data" th:object="${riskmerblack}">
        <input name="id" type="hidden" th:field="${riskmerblack.id}">
        <h4 class="form-header h4">白名单信息</h4>
        <div class="row">
            <div class="form-group">
                <label class="col-sm-3 control-label  is-required">姓名：</label>
                <div class="col-sm-8">
                    <input name="name"   placeholder="请输入姓名" th:field="${riskmerblack.name}" required type="text" class="form-control"  >
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group">
                <label class="col-sm-3 control-label  is-required">身份证：</label>
                <div class="col-sm-8">
                    <input name="typeVal" id="typeVal" th:field="${riskmerblack.typeVal}"  type="text" class="form-control"  required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b" th:field="${riskmerblack.status}" required>
                        <option value="0">启用</option>
                        <option value="1">禁用</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">添加原因：</label>
                <div class="col-sm-8">
                    <textarea name="addNote" th:field="${riskmerblack.addNote}" cols="10" rows="10" class="form-control"  type="text" required ></textarea>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: utils-js" />
<script th:inline="javascript">
    var prefix = ctx + "riskControl/riskmerblack"
    $("#form-record-add").validate({
        focusCleanup: true

    });
    function submitHandler() {
        if ($.validate.form()) {
            if (!$.vali.valiCard($("#typeVal").val())){
                $.modal.msgError("请输入正确的身份证号");
                return;
            }
            $.operate.save(prefix + "/edit", $('#form-risk_black').serialize());
        }
    }
    function selectMerInfo() {
        var url =prefix+ "/selectMerInfo";
        $.modal.open("选择商户" , url, '1000',"600");
    }
</script>
</body>
</html>